
import axios from 'axios';

/**
 * 菜谱
 */
export class VegetableMenuService {
    // 分页查询列表
    static findVegetableMenus (queryParams) {
        return axios({
            url: '/restaurant/sale/VegetableMenu/findVegetableMenus',
            method: 'POST',
            data: queryParams
        });
    }

    // 分页查询列表
    static findVegetableMenusWithCost (queryParams) {
        return axios({
            url: '/restaurant/sale/VegetableMenu/findVegetableMenusWithCost',
            method: 'POST',
            data: queryParams
        });
    }

    //根据ID查询指定的菜谱
    static findVegetableMenu (vegetableMenuId) {
        const query = {
            vegetableMenuId
        }
        return axios({
            url: '/restaurant/sale/VegetableMenu/findVegetableMenu',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的菜谱(包含外键名称)
    static findVegetableMenuForView (vegetableMenuId) {
        const query = {
            vegetableMenuId
        }
        return axios({
            url: '/restaurant/sale/VegetableMenu/findVegetableMenuForView',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的菜谱(包含外键名称)
    static findVegetableMenuForEdit (vegetableMenuId) {
        const query = {
            vegetableMenuId
        }
        return axios({
            url: '/restaurant/sale/VegetableMenu/findVegetableMenuForEdit',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的菜谱(只提取ID 和 Name)
    static findVegetableMenusWithIdNameById (vegetableMenuId) {
        const query = {
            vegetableMenuId
        }
        return axios({
            url: '/restaurant/sale/VegetableMenu/findVegetableMenusWithIdNameById',
            method: 'POST',
            params: query,
        });
    }

    //根据名称查询菜谱集合(只提取ID 和 Name)
    static findVegetableMenusWithIdNameByName (vegetableMenuName) {
        const query = {
            vegetableMenuName
        }
        return axios({
            url: '/restaurant/sale/VegetableMenu/findVegetableMenusWithIdNameByName',
            method: 'POST',
            params: query,
        });
    }

    //新增保存菜谱
    static saveVegetableMenu (vegetableMenu) {
        const query = {}
        return axios({
            url: '/restaurant/sale/VegetableMenu/saveVegetableMenu',
            method: 'POST',
            params: query,
            data: vegetableMenu
        });
    }

    //修改保存菜谱
    static updateVegetableMenu (vegetableMenu) {
        const query = {}
        return axios({
            url: '/restaurant/sale/VegetableMenu/updateVegetableMenu',
            method: 'POST',
            params: query,
            data: vegetableMenu
        });
    }

    //根据ID查询指定的菜谱(只提取ID 和 Name)
    static deleteVegetableMenu (vegetableMenuId) {
        const query = {
            vegetableMenuId
        }
        return axios({
            url: '/restaurant/sale/VegetableMenu/deleteVegetableMenu',
            method: 'POST',
            params: query,
        });
    }
}
